package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import util.PropertyLoader;

/**
 * Created by 1 on 06.04.2014.
 */
public class PhonesMp3GpsPage extends BasePage
{
    private static final String URL_HOME_PAGE = PropertyLoader.loadProperty("site.url");
    private static final String URL_PHONES_MP_3_GPS_PAGE =("http://rozetka.com.ua/phones-mp3-gps/c80257/");

    private static By PHONES_MP3_GPS_PAGE = By.xpath("//*[@id=\"phones-mp3-gps\"]/div/a");

    public PhonesMp3GpsPage(WebDriver driver) {
        super(driver);
    }


    public void openPhonesMp3GpsPage()
    {
        driver.get(URL_HOME_PAGE);
        driver.findElement(PHONES_MP3_GPS_PAGE).click();
    }
    public boolean phonesMp3GpsPageIsOpened()
    {
        return driver.getCurrentUrl().equals(URL_PHONES_MP_3_GPS_PAGE);
    }
}
